home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d18
/
tp_asm22.arc
/
README.NEW
< prev
next >
Wrap
Text File
|
1991-04-28
|
6KB
|
153 lines
TP&Asm Integrated Compile-Time Assembler Version 2.2
Copyright (c) 1989 Richard W. Prescott
All Rights Reserved
═══════ Built-In Assembly Language Support for Turbo Pascal Compilers ═══════
New features added with TP&Asm Version 2.2:
Full compile to Disk capability in the shareable version. (I've
decided to stop annoying people). This is a legitimate shareware
version.
Full support for Turbo Pascal version 5.5 and Object Oriented
Programming, including:
Use of Assemble and Internal statements in method definitions
(Supports both "ObjectName@MethodName" and "ObjectName.MethodName")
Unqualified Indexed Reference to an Object's data within its methods
Unindexed Reference to Static Object data using Pascal Record syntax
Automatic support for assembly references to "Self" and "VMT"
(Freely change object structure without rewriting any assembly code!)
Direct calls to Static AND VIRTUAL methods using Unindexed MethodName
Standard virtual calls to Virtual methods using Indexed MethodName
Please see the file TPA&OOP.PAS for examples of these features.
Version 2.2 also fixes the following bugs and restrictions:
TP&Asm 2.0 failed to find the DOS PATH variable if there was
another environment variable ending with 'PATH'.
TP&Asm 2.0 did not permit '@', '?', or '$' within Internal
data symbols.
TP&Asm 2.0 did not properly set the cursor position for syntax
errors detected in an Asm statement.
New features added with TP&Asm Version 2.0:
Added support for Assembly reference to Pascal UnitName and record
component qualifiers, permitting references like:
Mov Al,UnitX.RecVar.NestedRec.ByteComponent
Added support for references to String Function Result pointers in
Load Pointer (Les/Lds) instructions:
Les Di,StringFunctionName
(As in prior versions, all other Function types can be put in by
name using a Mov instruction:
Mov PtrFunction,Ax ;put in offset part
Mov PtrFunction+2,Dx ;put in segment part
Fixed an "undocumented restriction" (i.e., a bug) that prevented
use of the Assemble/Internal statements when compiling in the {$D-}
state.
New features added with TP&Asm Version 2 beta:
Added the ability to trace (F7 Trace into, F4 Go to cursor, etc)
assembly code in the turbo integrated debugger with the capability
to Watch, Evaluate, and Modify the state of all CPU registers and
Flags during the Trace.
Added support for Line Number detail for all assembly sections
(Except Inline/Assembly DIRECTIVES) in MAP files produced with any
Version 4 and 5 compilers. Permits source level debugging in any
MAP-file compatible debugger.
Added the capability to specify any valid Pascal Label within the
current block as the target of an Assembly Call, Jmp, Loop, or
conditional jump.
Added the capability to specify an assembly label which has been
declared in a standard Pascal "Label" statement as the target of a
Pascal "Goto" statement.
Added the Keyword "Assembly" as a synonym for "Assemble".
This is useful to avoid misleading constructions like:
IF <Pascal Condition> THEN Assemble
which gives the false impression of conditional assembly. True
conditional assembly is possible as described below. Conditional
execution of an assembly block is more clearly indicated by:
IF <Pascal Condition> THEN Assembly
Added the capability to use Assembly blocks in either clause of a
Pascal conditional expression, eg:
IF Compiler.Ver = $50 THEN Assembly
< Assembly language statements >
END
ELSE Assembly
< Assembly language statements >
END;
Added the keyword "Asm" for concisely specifying single line
assembly statements, eg:
Asm Push PascalVar; {Save PascalVar on Stack}
Added the Assembly Keyword "Pas" for inserting single or
multiple line Pascal statements within an assembly section, eg:
Pas WRITELN('Compiled with Turbo Pascal Version ',
Pas {$IFDEF VER40} '4.0' {$ELSE} '5.0' {$ENDIF} );
Permits true conditional assembly by placing a section of
assembly statements between "Pas {$IFDEF ..}" and "Pas {$ENDIF}".
Added support for direct calls to Pascal Procedures and Functions
defined in any standard or user-defined program or Unit.
Added support for automatic Jump-Sizing for all backward AND
FORWARD Jumps and Loops (Jmp, jZ, jAE, jCXZ, Loop, LoopNZ, etc).
3, 5, or 7 byte instruction sequences are automatically generated
if the target label is not within range of a 2 byte instruction.
This includes automatic shortening of unconditional jumps ...
Jmp CloseBy .. becomes .. Jmp Short CloseBy ;2 bytes
... automatic 5 byte "IF <Cond> Jmp" for backward AND FORWARD
conditional jumps out of range ...
jNZ FarAway .. becomes .. jZ >L0 ;2 bytes
Jmp FarAway ;3 bytes
L0:
... and automatic 7 byte instruction sequences for backward AND
FORWARD jCXZ & Loop's out of range ...
Loop FarAway .. becomes .. Loop >L0 ;2 bytes
Jmp Short >L1 ;2 bytes
L0: Jmp FarAway ;3 bytes
L1:
TP&Asm does NOT pad forward jumps with NOP instructions - it
will always build the smallest possible instruction.
(The automatic Jump-Sizing feature is not enabled in Inline/Assembly
DIRECTIVES. As described in the Turbo 4.0 and 5.0 manuals, Inline
Directives are intended for short sections of code which are unlikely
to exceed 127 bytes. TP&Asm generates an error if a conditional jump
out of range is attempted in an Inline/Assembly Directive).
Added the KeyWord "CSDATA" for allocating "Global" CSeg data which
can be used throughout the current Unit. Alternately, the FIRST
procedure in a Unit or Program can allocate "LOCAL" CSeg data which
can be used throughout the procedure.
Added support for the construct "SEG Data" to facilitate restoring
the Turbo Program Data Segment in a user written interrupt procedure:
Mov Ax,SEG Data
Mov Ds,Ax